home *** CD-ROM | disk | FTP | other *** search
- (***************************************************************************
-
- $RCSfile: ToolDlgTpl.mod $
- Description: Defines and implements the IntuiSup template for the tool
- editor dialog.
-
- Created by: fjc (Frank Copeland)
- $Revision: 1.8 $
- $Author: fjc $
- $Date: 1995/01/26 00:15:33 $
-
- Copyright © 1993-1994, Frank Copeland.
- This file is part of FPE.
- See FPE.doc for conditions of use and distribution.
-
- Log entries are at the end of the file.
-
- ***************************************************************************)
-
- <* MAIN- *> <*$ NilChk- *>
-
- MODULE ToolDlgTpl;
-
- IMPORT
- SYS := SYSTEM, e := Exec, i := Intuition, is := IntuiSup, Data;
-
-
- (*------------------------------------*)
- (* Project Information *)
-
- CONST
-
- LeftEdge * = 0;
- TopEdge * = 0;
- Width * = 465;
-
- VAR
- Height * : INTEGER;
-
-
- (*------------------------------------*)
- (* Gadget data *)
-
- CONST
-
- NumGadgetDatas * = 11;
-
- TYPE
-
- GadgetDataPtr * = POINTER TO GadgetData;
-
- GadgetData * = RECORD
- g0 * : is.InputData;
- g1 * : is.InputData;
- g2 * : is.InputData;
- g3 * : is.CheckData;
- g4 * : is.CheckData;
- g6 * : is.InputData;
- g8 * : is.InputData;
- g9 * : is.ButtonData;
- g10 * : is.ButtonData;
- dataEnd : LONGINT;
- END; (* GadgetData *)
-
-
- (*------------------------------------*)
- (* Template data structure *)
-
- TYPE
-
- Template * = RECORD
- GadgetData * : GadgetDataPtr;
- END; (* Template *)
-
-
- (*------------------------------------*)
- (* Local procedures *)
-
-
- (*------------------------------------*)
- (* Font data *)
-
-
- (*------------------------------------*)
- PROCEDURE TextHeight () : INTEGER;
-
- VAR scr : i.Screen;
-
- BEGIN (* TextHeight *)
- IF i.GetScreenData (scr, SIZE (i.Screen), {i.wbenchScreen}, NIL) THEN
- RETURN scr.font.ySize
- ELSE
- RETURN 8
- END
- END TextHeight;
-
-
- (*------------------------------------*)
- (* Gadget data *)
-
- (*------------------------------------*)
- PROCEDURE InitGadgetData (gd : GadgetDataPtr);
-
- VAR textHeight : INTEGER;
-
- BEGIN (* InitGadgetData *)
- ASSERT (gd # NIL, 137);
- textHeight := TextHeight ();
-
- gd.g0.type := is.string;
- gd.g0.flags := {is.gdTextLeft, is.gdInputAutoActivate};
- gd.g0.leftEdge := 128;
- gd.g0.topEdge := textHeight + 7;
- gd.g0.width := 115;
- gd.g0.height := textHeight + 6;
- gd.g0.text := SYS.ADR("Button");
- gd.g0.textAttr := NIL;
- gd.g0.len := Data.ButtonChars;
- gd.g0.activateNext := 1;
- gd.g0.activatePrev := 6;
-
- gd.g1.type := is.string;
- gd.g1.flags := {is.gdTextLeft, is.gdInputAutoActivate};
- gd.g1.leftEdge := 128;
- gd.g1.topEdge := (2 * textHeight) + 16;
- gd.g1.width := 325;
- gd.g1.height := textHeight + 6;
- gd.g1.text := SYS.ADR("Command");
- gd.g1.textAttr := NIL;
- gd.g1.len := Data.PathChars;
- gd.g1.activateNext := 2;
- gd.g1.activatePrev := 0;
-
- gd.g2.type := is.string;
- gd.g2.flags := {is.gdTextLeft, is.gdInputAutoActivate};
- gd.g2.leftEdge := 128;
- gd.g2.topEdge := (3 * textHeight) + 25;
- gd.g2.width := 325;
- gd.g2.height := textHeight + 6;
- gd.g2.text := SYS.ADR("Arguments");
- gd.g2.textAttr := NIL;
- gd.g2.len := Data.PathChars;
- gd.g2.activateNext := 5;
- gd.g2.activatePrev := 1;
-
- gd.g3.type := is.check;
- gd.g3.flags := {is.gdTextRight};
- gd.g3.leftEdge := 298;
- gd.g3.topEdge := textHeight + 8;
- gd.g3.width := 27;
- gd.g3.height := textHeight + 3;
- gd.g3.text := SYS.ADR("Active ?");
- gd.g3.textAttr := NIL;
-
- gd.g4.type := is.check;
- gd.g4.leftEdge := 13;
- gd.g4.topEdge := (4 * textHeight) + 35;
- gd.g4.width := 27;
- gd.g4.height := textHeight + 3;
-
- gd.g6.type := is.string;
- gd.g6.flags := {is.gdTextLeft, is.gdInputAutoActivate};
- gd.g6.leftEdge := 128;
- gd.g6.topEdge := (4 * textHeight) + 34;
- gd.g6.width := 325;
- gd.g6.height := textHeight + 6;
- gd.g6.text := SYS.ADR("Console");
- gd.g6.textAttr := NIL;
- gd.g6.len := Data.ConsoleChars;
- gd.g6.activateNext := 6;
- gd.g6.activatePrev := 2;
-
- gd.g8.type := is.integer;
- gd.g8.flags := {is.gdTextLeft, is.gdInputAutoActivate};
- gd.g8.leftEdge := 128;
- gd.g8.topEdge := (5 * textHeight) + 43;
- gd.g8.width := 75;
- gd.g8.height := textHeight + 6;
- gd.g8.text := SYS.ADR("Stack");
- gd.g8.textAttr := NIL;
- gd.g8.len := 5;
- gd.g8.activateNext := 0;
- gd.g8.activatePrev := 5;
- gd.g8.default := SYS.VAL (e.APTR, 4000);
-
- gd.g9.type := is.button;
- gd.g9.leftEdge := 248;
- gd.g9.topEdge := (6 * textHeight) + 52;
- gd.g9.width := 100;
- gd.g9.height := textHeight + 6;
- gd.g9.text := SYS.ADR("Accept");
- gd.g9.textAttr := NIL;
-
- gd.g10.type := is.button;
- gd.g10.leftEdge := 353;
- gd.g10.topEdge := (6 * textHeight) + 52;
- gd.g10.width := 100;
- gd.g10.height := textHeight + 6;
- gd.g10.text := SYS.ADR("Cancel");
- gd.g10.textAttr := NIL;
-
- gd.dataEnd := is.dataEnd;
- END InitGadgetData;
-
-
- (*------------------------------------*)
- (* Exported procedures *)
-
-
- (*------------------------------------*)
- PROCEDURE InitTemplate * (VAR template : Template);
-
- BEGIN (* InitTemplate *)
- Height := (7 * TextHeight()) + 64;
- NEW (template.GadgetData);
- InitGadgetData (template.GadgetData)
- END InitTemplate;
-
-
- (*------------------------------------*)
- PROCEDURE CleanupTemplate * (VAR template : Template);
-
- BEGIN (* CleanupTemplate *)
- SYS.DISPOSE (template.GadgetData)
- END CleanupTemplate;
-
-
- END ToolDlgTpl.
-
- (***************************************************************************
-
- $Log: ToolDlgTpl.mod $
- Revision 1.8 1995/01/26 00:15:33 fjc
- - Release 1.5
-
- Revision 1.7 1994/09/25 18:20:54 fjc
- - Uses new syntax for external code declarations
-
- Revision 1.6 1994/08/08 16:13:59 fjc
- Release 1.4
-
- Revision 1.5 1994/06/17 17:32:19 fjc
- - Updated for release
-
- Revision 1.4 1994/06/04 23:49:52 fjc
- - Changed to use new Amiga interface
-
- Revision 1.3 1994/05/12 21:26:09 fjc
- - Prepared for release
-
- Revision 1.2 1994/01/24 14:33:33 fjc
- Changed version control header
-
- Revision 1.1 1994/01/15 17:32:38 fjc
- Start of revision control
-
- ***************************************************************************)
-
-
-